<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>收藏夹</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="fontawesome/css/all.min.css">
    <link rel="stylesheet" href="css/templatemo-style.css" charset="utf-8">
    <div id="loader-wrapper">
        <div id="loader"></div>
        <div class="loader-section section-left"></div>
        <div class="loader-section section-right"></div>
    </div>
</head>
<body>
<div id="header"></div>
<div class="container-fluid tm-mt-60">
    <div class="row mb-4">
        <h2 class="col-6 tm-text-primary" id="searchImg">
            My Favorite
        </h2>
    </div>
    <div class="row tm-mb-90 tm-gallery" id="img_loader">
    </div>
</div>
<div id="footer"></div>
<script type="text/javascript" src="js/getParameter.js"></script>
<script src="js/plugins.js"></script>
<script>
    $(function () {
        var uid = getParameter("uid");
        $.get("/photograph/photo/myFavorite",
            {uid:uid},
            function (data) {
                $div=$("#img_loader");
                var divList='';
                for(var i = 0; i < data.list.length; i++) {
                    var div='<div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 mb-5">\n' +
                        '            <figure class="effect-ming tm-video-item">\n' +
                        '                <img src="'+data.list[i].isrc+'" alt="Image" class="img-fluid">\n' +
                        '                <figcaption class="d-flex align-items-center justify-content-center">\n' +
                        '                    <h2>'+data.list[i].iname+'</h2>\n' +
                        '                    <a href="photo-detail.html?iid='+data.list[i].iid+'">View more</a>\n' +
                        '                </figcaption>\n' +
                        '            </figure>\n' +
                        '            <div class="d-flex justify-content-between tm-text-gray">\n' +
                        '                <span class="tm-text-gray-light">'+data.list[i].idate+'</span>\n' +
                        '                <span>'+data.list[i].iclick+' views</span>\n' +
                        '            </div>\n' +
                        '        </div>';
                    divList+=div;
                }
                $div.html(divList);
            },"json");
    });
    $(window).on("load", function () {
        $('body').addClass('loaded');
        $.get("header.html", function (data) {
            $("#header").html(data);
        });
        $.get("footer.html", function (data) {
            $("#footer").html(data);
        });
    });
</script>
</body>
</html>